package com.roc.util;

public class MyPageCount {
	
	public static int getTotalPages(int totalNum,int num){
		if(totalNum%num==0)
			return totalNum/num;
		return (totalNum/num)+1;
		
	}
	public static int checkCurrentpage(String currentpage,int totalPage){
		int currentPage=Integer.parseInt(currentpage);
		if(currentPage<1){
			currentPage=1;
		}
		if(currentPage>totalPage){
			currentPage=totalPage;
		}
		return currentPage;
	}
	
	public static void main(String[] args) {
		System.out.println("2".compareTo("12"));
	}
	
}
